package com.jake.spring.transactional.service;

import com.jake.spring.transactional.domain.Employee;
import com.jake.spring.transactional.mapper.EmployeeMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class NoInterfaceEmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Transactional
    public int updateById(Employee employee, Integer empId) {
        return employeeMapper.updateById(employee, empId);
    }
}
